﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BO = Viewer.BusinessObject.BusinessEntities;
using Ext.Net;

namespace Viewer.NhanSu.UserControl
{
    public partial class UCTimNgach : System.Web.UI.UserControl
    {
        BO.CommonCode query = new Viewer.BusinessObject.BusinessEntities.CommonCode();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {

            }
        }
        public void ShowDialogTimNgach(string type)
        {
            hdTypeCode.Text = type;
            wdTimNgach.Show();
            storeNgach.DataSource = query.LoadDataCommonByCodeStringAndCodeValue(type, string.Empty, string.Empty);
            storeNgach.DataBind();
        }
        protected void BtnSearch_Click(object sender, DirectEventArgs e)
        {

            storeNgach.DataSource = query.LoadDataCommonByCodeStringAndCodeValue(hdTypeCode.Text, txtMaNgach.Text, txtTenNgach.Text);
            storeNgach.DataBind();
            X.Mask.Hide();
        }
    }
}